<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="shortcut icon" href="../../../docs/src/assets/image2D.png">
    <script src="../../../build/image2D.js"></script>
    <title>image2D - 用例测试 - rect矩形</title>
</head>

<body>
    <script>

        // 准备画布
        var svg = $$('<svg></svg>').attr({
            "width": 600,
            "height": 600
        }).appendTo('body');

        // 获取并配置画笔
        var painter = svg.painter();

        /**
         * 测试开始
         * ----------------------------
         */

        painter.bind("<rect>").strokeRect(10, 10, 80, 180).appendTo(svg);
        painter.bind("<rect>").fillRect(100, 10, 290, 180).appendTo(svg);
        painter.bind("<rect>").config({
            fillStyle: "red",
            strokeStyle: "black",
            lineDash: []
        }).fullRect(400, 10, 180, 180).appendTo(svg);
        // 测试虚线
        painter.config('lineDash', [15, 5]).bind("<rect>").strokeRect(20, 20, 60, 160).appendTo(svg);

        // 测试负数
        painter.bind("<rect>").fillRect(0, 400, 100, -150).appendTo(svg);
        painter.bind("<rect>").fillRect(250, 250, -100, 150).appendTo(svg);
        painter.bind("<rect>").fillRect(400, 400, -100, -150).appendTo(svg);

    </script>
</body>

</html>
